import Vue from 'vue';
import App from './App';
import uView from 'uview-ui';
import store from './store';
import API from '@/api';
import dialog from '@/common/mp.dialog';
import mixins from './common/mp.mixin';
import config from '@/common/config';
import '@/common/mp.common';

Vue.use(uView);

Vue.config.productionTip = false;

Object.defineProperties(Vue.prototype, {
  $api: {
    value: API,
  },
  $dialog: {
    value: dialog,
  },
  $config: {
    value: config,
  },
});

// 导入公共组件
Vue.prototype.$store = store;

// 注入通用方法
Vue.mixin(mixins);

App.mpType = 'app';

const app = new Vue({
  store,
  ...App,
});
app.$mount();
